// 1.0 引入封装的axios请求文件
import req from '../utils/request.js'

// 2.0 导出登录的请求方法
export function getCateList(params) {
  return req.get('/goods/catelist', params)
}

// 3.0 删除分类
export function deleteCate(params) {
  return req.get('/goods/delcate', params)
}

// 4.0 添加分类
export function addCategory(params) {
  return req.post('/goods/addcate', params)
}

// 5.0 修改分类
export function editCategory(params) {
  return req.post('/goods/editcate', params)
}

// 6.0 请求商品列表
export function getPros(params) {
  return req.get('/goods/list', params)
}

// 7.0 删除商品
export function deletePro(params) {
  return req.get('/goods/del', params)
}

// 8.0 获取单个商品
export function getProItem(params) {
  return req.get('/goods/item', params)
}

// 9.0 获取所有的分类
export function getAllCate(params) {
  return req.get('/goods/categories', params)
}

// 10.0 添加商品
export function addProduct(params) {
  return req.post('/goods/add', params)
}
